<!--
 * Copyright 2017 The Chromium Authors. All rights reserved.  Use of this
 * source code is governed by a BSD-style license that can be found in the
 * LICENSE file.
-->
<!--
 Test to ensure that labels and descriptions that come from elsewhere in the
 tree are updated when the related content changes.
-->
<html>
<head>
  <title>Automation Tests - Tree change Indirect</title>
</head>
<body>
<div>
  <input type="checkbox" id="input">
  <label id="input-name" for="input">cats</label>
</div>

<div id="main" role="main" aria-labelledby="main-name">
</div>
<p id="main-name">apples</p>

<div id="group" role="group" aria-describedby="group-desc">
  Group
</div>
<p id="group-desc">butter</p>

<button id="change">Change</button>

<script>
  document.getElementById('change').addEventListener('click', function() {
    document.getElementById('input-name').innerHTML = 'dogs';
    document.getElementById('main-name').innerHTML = 'oranges';
    document.getElementById('group-desc').innerHTML = 'margarine';
  });
</script>

</body>
</html>
